import { create } from 'zustand';

interface Project {
  id: number;
  name: string;
  description: string;
}

type ProjectStore = {
  currentProject: Project | null;
  projects: Project[];
  setCurrentProject: (project: Project | null) => void;
  setProjects: (projects: Project[]) => void;
};

const useProjectStore = create<ProjectStore>((set) => ({
  currentProject: null,
  projects: [],
  setCurrentProject: (project) => set({ currentProject: project }),
  setProjects: (projects) => set({ projects }),
}));

export type { Project };
export default useProjectStore; 